home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
COMAL
/
U-User Group
/
(k)u3.d64
/
a maz'in basic.b
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-28
|
1KB
|
47 lines
10 PRINT"[147]":X=2:Y=14:GOSUB460:PRINT"A MAZ'IN BASIC
20 [153]"YOU GET 500 POINTS FOR REACHING FINISH
30 PRINT"AND YOU GET 10 POINTS FOR EVERY SPACE
40 [153]"THAT YOU GET....BUT YOU MUST HURRY!
50 PRINT"YOU HAVE 5 SCREENS TO PLAY UNLESS YOU
60 [153]"GET BOXED IN IN WHICH CASE YOU LOSE.
70 PRINT"IF YOU'RE BRAVE ENOUGH TO PLAY THEN USE
80 [153]"JOYSTICK #1 AND INPUT
90 INPUT"YOUR NAME";N$
100 FORT=2TO6
110 PRINT"[147] SETTING UP MAZE #"T-1;"[157]";
120 POKE53280,T
130 POKE53281,T
140 FORA=1TO979:PRINT" ";:NEXT
150 Q=.2:D=23:E=T:Z=1024
160 FORH=1TO23:FORI=1TO38
170 IFRND(1)>QTHENPOKEZ+H*40+I,32
180 NEXT:NEXT
190 PRINT" [146] FINISH[146] "
200 H=INT(RND(1)*(16)+2)
210 I=INT(RND(1)*(23)+15)
220 B=D:C=E
230 F=H:G=I
240 IFRND(1)>Q THEN H=H-SGN(H-D):I=I+SGN(E-I):GOTO 270
250 H=H+INT(RND(1)*3-1)
260 I=I+INT(RND(1)*3-1)
270 IFPEEK(Z+H*40+I)>127THENH=F:I=G
280 P=PEEK(56321)
290 D=D+((PAND1)=0)-((PAND2)=0)
300 E=E+((PAND4)=0)-((PAND8)=0)
310 X=B:Y=C:GOSUB460:PRINT"[166]"
320 X=F:Y=G:GOSUB460:PRINT"$"
330 IFPEEK(Z+D*40+E)>90THEND=B:E=C
340 X=D:Y=E:GOSUB460:PRINT"O"
350 X=H:Y=I:GOSUB460:PRINT"M"
360 PRINT" "N$"'S SCORE"S:IFD<>CORE<>CTHENS=S+10
370 IFD<>0AND(D<>HORE<>I)THEN220
380 PRINT"[147]"
390 IFD=0THENS=S+500:X=12:Y=11:GOSUB460:PRINT"*** YOU ESCAPED ***
400 [139]D[178]H[175]E[178]I[167] X[178]12:Y[178]9:[141]460:[153]"*** YOU WERE EATEN ***
410 FORK=0TO2000:NEXT
420 NEXT T:PRINT"[147] FINAL SCORE"S
430 POKE198,0:INPUT"PLAY AGAIN Y/N";P$
440 IF LEFT$(P$,1)="Y" THEN 100
450 END
460 POKE214,X:POKE211,Y:SYS58732:RETURN